package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin
@RestController
public class TestController {

    @Autowired
    StringRedisTemplate redisTemplate;

    @RequestMapping("/testx")
    public String testC()
    {

        redisTemplate.opsForValue().set("1","1");
        return "ok";
    }
}
